#!/bin/sh

ddate=`date --date="${1} days ago" +%Y-%m-%d`
year=`date --date="${1} days ago" +%Y`
month=`date --date="${1} days ago" +%m`
logbase="/home/admin/cai/logs/cronolog"

fgrep -v 'http://wk.taobao.com-' $logbase/$year/$month/$ddate-taobao-access_log > ~/1.log

cat ~/1.log | ./mapper.py | ./reducer.py